/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package xenon3d.scene.animators;

import xenon3d.vector.AxisAngle4f;

/**
 *
 * @author Volker Everts
 */
public class RotationAnimator extends SceneNodeAnimator {

    /** The current axis angle of rotation. */
    private AxisAngle4f angle;

    /** The angular velocity. */
    private float omega;

    /**
     * Creates a new RotationAnimator.
     */
    public RotationAnimator(AxisAngle4f start, float omega) {
        angle = new AxisAngle4f(start);
        this.omega = omega;
    }

    @Override
    public void animate(SceneNode node, float deltaTime) {
        angle.addAngle(omega * deltaTime);
        node.setRotation(angle);
    }

} // end class RotationAnimator